package com.wjc.train.business.repository;

import com.wjc.train.business.entity.SkToken;
import com.wjc.train.business.mapper.SkTokenMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.wjc.train.business.req.SkTokenQueryReq;
import com.wjc.train.business.resp.SkTokenQueryResp;

import java.util.Date;

/**
 * <p>
 *  仓储类
 * </p>
 *
 * @author Guessed
 * @since 2023-09-01
 */
@Repository
public class SkTokenRepository extends ServiceImpl<SkTokenMapper, SkToken> implements IService<SkToken>  {

   public IPage<SkTokenQueryResp> queryList(IPage<SkTokenQueryResp> page, SkTokenQueryReq sktokenQueryReq) {
        return baseMapper.queryList(page,sktokenQueryReq);
    }

    public int decrease(Date trainDate, String trainCode,int decreaseNum) {
        return baseMapper.decrease(trainDate,trainCode,decreaseNum);
    }
}